package com.nlgc365.designpattern.Chapter04_Pattern.Creation.P02_Factory.Calculator.FactoryMethod;

public class Client {
    public static void main(String[] args) {
        CalculatorFactory factory = new CalculatorAddFactoryImpl(); //相比静态工厂实现方式, 仅仅在客户端决定
        Calculator operation1 = factory.createOperation();
        operation1.calculate(1, 1);

        Calculator operation2 = factory.createOperation();
        operation2.calculate(1, 1);

        Calculator operation3 = factory.createOperation();
        operation3.calculate(1, 1);
    }
}
